package com.unicom.adapter;

import java.util.ArrayList;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.View;
import android.view.ViewGroup;

public class HomeMyStoryAdapter  extends FragmentPagerAdapter{
	private ArrayList<Fragment> listFragment;
	public static final int TAB_ALL_STORY = 0;
	public static final int TAB_BOOKMARK = 1;
	public static final int TAB_HISTORY = 2;
	
	public HomeMyStoryAdapter(FragmentManager fm, ArrayList<Fragment> listFragment) {
		super(fm);
		this.listFragment = listFragment;
	}

	@Override
	public Fragment getItem(int position) {
		switch (position) {
		case TAB_ALL_STORY:
			return listFragment.get(position);
			
		case TAB_BOOKMARK:
			return listFragment.get(position);
			
		case TAB_HISTORY:
			return listFragment.get(position);
			
		default:
			return null;
		}
	}
	
	@Override
	public int getItemPosition(Object object) {
		return POSITION_NONE;
	}
	
	@Override
	public void destroyItem(View container, int position, Object object) {
		super.destroyItem(container, position, object);
	}
	
	@Override
	public Object instantiateItem(View container, int position) {
		return super.instantiateItem(container, position);
	}

	@Override
	public int getCount() {
		return listFragment.size();
	}
	
}
